Implement `cargo:rerun-if-env-changed=FOO`
authorAlex Crichton <alex@alexcrichton.com>
Mon, 5 Jun 2017 14:52:31 +0000 (07:52 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 14 Jun 2017 21:23:15 +0000 (14:23 -0700)
commitfe8bbb7a544e5bafadfb58b1f1c9132b9952c43f
tree0d7f7d281ef9b61b0a0614bfeacf45ba932ed98c
parentbbb38dce7f224c4c83d4fb9a69dfe9c783e00a4e
Implement `cargo:rerun-if-env-changed=FOO`

This commit implements a new method of rerunning a build script if an
environment variable changes. Environment variables are one of the primary
methods of giving inputs to a build script today, and this'll help situations
where if you change an env var you don't have to remember to clean out an old
build directory to ensure fresh results.

Closes #2776
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/custom_build.rs
src/cargo/ops/cargo_rustc/fingerprint.rs
src/doc/build-script.md
tests/build-script-env.rs [new file with mode: 0644]